package com.study.mybatis.controller;


import com.study.mybatis.dao.entity.UserPO;
import com.study.mybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {


    @Autowired
    UserService userService;

    @RequestMapping("/hello")
    public String hello(Integer id){
        UserPO userById = userService.getUserById(id);
        System.out.println(userById.toString());
        return userById.getName();
    }
}
